<template>
  <div class="image-recognition-component">
    <h2 class="title">图片识别</h2>
    <div class="main-content">
      <div class="left-section">
        <div class="identity-info">
          <p class="name">姓名: {{ name }}</p>
          <p class="id-number">相关信息: {{ idNumber }}</p>
          <p style="font-size: small;color:red;text-align: center;">请确认信息是否一致</p>
        </div>
        <img src="@/assets/照片.svg"/>
      </div>
      <div class="right-section">
        <button class="action-btn">拍摄</button>
        <img src="@/assets/拍摄.svg" class="shot-img"/>
        <button class="action-btn">上传</button>
        <img src="@/assets/上传图片.svg" class="upload-img"/>
      </div>
    </div>
    <button @click="isSend" class="send-sms-btn">发送短信</button>
  </div>
</template>

<script setup>
import { ref } from 'vue';

const name = ref('张三'); 
const idNumber = ref('1234567890'); 

function isSend(){
  alert('短信已发送');
}
</script>

<style scoped>
img{
  height: 60px;
  width: 100px;
  position: absolute;
  top: 130px;
  right: 200px; 
}
.shot-img{
  height: 30px;
  width: 30px;
  position: absolute;
  top: 128px;
  right: 50px;
}
.upload-img{
  height: 30px;
  width: 30px;
  position: absolute;
  top: 176px;
  right: 50px;
}
.image-recognition-component {
  width: 500px;
  height: 300px;
  font-family: Arial, sans-serif;
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 10px;
  position: absolute; 
  top: 120px;
  left: 30%;
}

.title {
  color: #333;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
}

.main-content {
  width: 480px;
  display: flex;
  padding-left: 10px;
  justify-content: space-between;
  align-items: center;
}

.left-section {
  flex: 1;
  padding: 20px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  flex-direction: column; 
  justify-content: space-between;
}

.right-section {
  width: 90px;
  padding: 20px;
  margin: 10px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.identified-image {
  width: 100%;
  border-radius: 5px;
}

.identity-info {
  margin-top: 10px;
}

.name,
.id-number {
  color: #555;
  font-size: 16px;
}

.action-btn {
  width: 100px;
  padding: 10px 20px;
  font-size: 16px;
  background-color: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: background-color 0.3s ease;
}

.action-btn:hover {
  background-color: #45a049;
}

.send-sms-btn {
  padding: 15px 30px;
  background-color: #007BFF;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  width: 150px;
  align-self: center;
  position: absolute;
  left: 180px;
  bottom: 20px;
}

.send-sms-btn:hover {
  background-color: #0056b3;
}
</style>